import Vue from 'vue'
import '@/assets/style/index.less'

export async function entry(components, options = {}) {
	const defaultOption = {
		needLogin: false,
		background: '#fff',
		header: true,
		watermark: true
	}
	options = { ...defaultOption, ...options }

	Vue.prototype.$openUrl = (url) => {
		window.location.href = url
	}

	new Vue({
		render: (h) => h(components)
	}).$mount('#app')

	// 背景色设置
	document.getElementById('container').style.backgroundColor = options.background
}
